
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-classIcon"></use>
                    </svg>
                    <div class="name">房产</div>
                    <div class="fontclass">#icon-classIcon</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-customer-service"></use>
                    </svg>
                    <div class="name">客服</div>
                    <div class="fontclass">#icon-customer-service</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-woman"></use>
                    </svg>
                    <div class="name">女</div>
                    <div class="fontclass">#icon-woman</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-uparrow"></use>
                    </svg>
                    <div class="name">上箭头</div>
                    <div class="fontclass">#icon-uparrow</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-complaint"></use>
                    </svg>
                    <div class="name">投诉</div>
                    <div class="fontclass">#icon-complaint</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-praise"></use>
                    </svg>
                    <div class="name">好评</div>
                    <div class="fontclass">#icon-praise</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-circle"></use>
                    </svg>
                    <div class="name">圈</div>
                    <div class="fontclass">#icon-circle</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-camera"></use>
                    </svg>
                    <div class="name">照相机</div>
                    <div class="fontclass">#icon-camera</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-success1"></use>
                    </svg>
                    <div class="name">成功</div>
                    <div class="fontclass">#icon-success1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-many-people"></use>
                    </svg>
                    <div class="name">多人</div>
                    <div class="fontclass">#icon-many-people</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-class"></use>
                    </svg>
                    <div class="name">班级</div>
                    <div class="fontclass">#icon-class</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sleep"></use>
                    </svg>
                    <div class="name">睡觉</div>
                    <div class="fontclass">#icon-sleep</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-star-select"></use>
                    </svg>
                    <div class="name">星级</div>
                    <div class="fontclass">#icon-star-select</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-parent-personal"></use>
                    </svg>
                    <div class="name">个人</div>
                    <div class="fontclass">#icon-parent-personal</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-good-scores"></use>
                    </svg>
                    <div class="name">好评</div>
                    <div class="fontclass">#icon-good-scores</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-caveat"></use>
                    </svg>
                    <div class="name">警惕</div>
                    <div class="fontclass">#icon-caveat</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-angle-right"></use>
                    </svg>
                    <div class="name">返回</div>
                    <div class="fontclass">#icon-angle-right</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-feedback-option"></use>
                    </svg>
                    <div class="name">评论</div>
                    <div class="fontclass">#icon-feedback-option</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-cry"></use>
                    </svg>
                    <div class="name">哭泣</div>
                    <div class="fontclass">#icon-cry</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-telphone"></use>
                    </svg>
                    <div class="name">电话</div>
                    <div class="fontclass">#icon-telphone</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-video"></use>
                    </svg>
                    <div class="name">视频</div>
                    <div class="fontclass">#icon-video</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-comment"></use>
                    </svg>
                    <div class="name">评论</div>
                    <div class="fontclass">#icon-comment</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-lunch"></use>
                    </svg>
                    <div class="name">午餐</div>
                    <div class="fontclass">#icon-lunch</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-aixin"></use>
                    </svg>
                    <div class="name">爱心</div>
                    <div class="fontclass">#icon-aixin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-praise-alt"></use>
                    </svg>
                    <div class="name">爱心</div>
                    <div class="fontclass">#icon-praise-alt</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-deletePhoto"></use>
                    </svg>
                    <div class="name">删  除</div>
                    <div class="fontclass">#icon-deletePhoto</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-reviewing"></use>
                    </svg>
                    <div class="name">时钟</div>
                    <div class="fontclass">#icon-reviewing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-renewal-fee"></use>
                    </svg>
                    <div class="name">费用</div>
                    <div class="fontclass">#icon-renewal-fee</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-select-hook"></use>
                    </svg>
                    <div class="name">勾</div>
                    <div class="fontclass">#icon-select-hook</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-error"></use>
                    </svg>
                    <div class="name">错</div>
                    <div class="fontclass">#icon-error</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-my-score"></use>
                    </svg>
                    <div class="name">分数线</div>
                    <div class="fontclass">#icon-my-score</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-notice"></use>
                    </svg>
                    <div class="name">须知(1)</div>
                    <div class="fontclass">#icon-notice</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-course"></use>
                    </svg>
                    <div class="name">课程方向</div>
                    <div class="fontclass">#icon-course</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-headquarters-phone"></use>
                    </svg>
                    <div class="name">电话</div>
                    <div class="fontclass">#icon-headquarters-phone</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-summary"></use>
                    </svg>
                    <div class="name">日报</div>
                    <div class="fontclass">#icon-summary</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-courseInfo"></use>
                    </svg>
                    <div class="name">课程</div>
                    <div class="fontclass">#icon-courseInfo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-morning-check"></use>
                    </svg>
                    <div class="name">晨检</div>
                    <div class="fontclass">#icon-morning-check</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-success2"></use>
                    </svg>
                    <div class="name">成功</div>
                    <div class="fontclass">#icon-success2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-top"></use>
                    </svg>
                    <div class="name">上</div>
                    <div class="fontclass">#icon-top</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jinggao"></use>
                    </svg>
                    <div class="name">警告</div>
                    <div class="fontclass">#icon-jinggao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-men"></use>
                    </svg>
                    <div class="name">男</div>
                    <div class="fontclass">#icon-men</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-reservation"></use>
                    </svg>
                    <div class="name">笑脸</div>
                    <div class="fontclass">#icon-reservation</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-star"></use>
                    </svg>
                    <div class="name">星级</div>
                    <div class="fontclass">#icon-star</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-chenggong1"></use>
                    </svg>
                    <div class="name">成功</div>
                    <div class="fontclass">#icon-chenggong1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-geren1"></use>
                    </svg>
                    <div class="name">个人</div>
                    <div class="fontclass">#icon-geren1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-new-renewals"></use>
                    </svg>
                    <div class="name">费用</div>
                    <div class="fontclass">#icon-new-renewals</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-addition1"></use>
                    </svg>
                    <div class="name">添加</div>
                    <div class="fontclass">#icon-addition1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-student-list"></use>
                    </svg>
                    <div class="name">名单</div>
                    <div class="fontclass">#icon-student-list</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-invite"></use>
                    </svg>
                    <div class="name">邀请亲友</div>
                    <div class="fontclass">#icon-invite</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-happy"></use>
                    </svg>
                    <div class="name">开心</div>
                    <div class="fontclass">#icon-happy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-unhappy"></use>
                    </svg>
                    <div class="name">不开心</div>
                    <div class="fontclass">#icon-unhappy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-super-happy"></use>
                    </svg>
                    <div class="name">超开心</div>
                    <div class="fontclass">#icon-super-happy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-delete"></use>
                    </svg>
                    <div class="name">删除</div>
                    <div class="fontclass">#icon-delete</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-feedback"></use>
                    </svg>
                    <div class="name">意见反馈</div>
                    <div class="fontclass">#icon-option-feedback</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daishufuwu"></use>
                    </svg>
                    <div class="name">袋鼠服务</div>
                    <div class="fontclass">#icon-daishufuwu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-history-info"></use>
                    </svg>
                    <div class="name">历史消息</div>
                    <div class="fontclass">#icon-history-info</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-customize"></use>
                    </svg>
                    <div class="name">自定义消息</div>
                    <div class="fontclass">#icon-customize</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dayCheck"></use>
                    </svg>
                    <div class="name">晨检</div>
                    <div class="fontclass">#icon-dayCheck</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-new-summary"></use>
                    </svg>
                    <div class="name">日总结</div>
                    <div class="fontclass">#icon-new-summary</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-new-history"></use>
                    </svg>
                    <div class="name">历史消息</div>
                    <div class="fontclass">#icon-new-history</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-interactive"></use>
                    </svg>
                    <div class="name">互动率</div>
                    <div class="fontclass">#icon-interactive</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-less"></use>
                    </svg>
                    <div class="name">较少</div>
                    <div class="fontclass">#icon-less</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-normal"></use>
                    </svg>
                    <div class="name">正常</div>
                    <div class="fontclass">#icon-normal</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-add"></use>
                    </svg>
                    <div class="name">添加</div>
                    <div class="fontclass">#icon-add</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baby_summary"></use>
                    </svg>
                    <div class="name">日总结</div>
                    <div class="fontclass">#icon-baby_summary</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baby_sleep"></use>
                    </svg>
                    <div class="name">午睡</div>
                    <div class="fontclass">#icon-baby_sleep</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baby_check"></use>
                    </svg>
                    <div class="name">晨检</div>
                    <div class="fontclass">#icon-baby_check</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baby_astriction"></use>
                    </svg>
                    <div class="name">便秘</div>
                    <div class="fontclass">#icon-baby_astriction</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baby_diarrhea"></use>
                    </svg>
                    <div class="name">拉肚子</div>
                    <div class="fontclass">#icon-baby_diarrhea</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baby_teach"></use>
                    </svg>
                    <div class="name">午睡</div>
                    <div class="fontclass">#icon-baby_teach</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baby_lunch"></use>
                    </svg>
                    <div class="name">午饭</div>
                    <div class="fontclass">#icon-baby_lunch</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
